<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>首页</title>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
    <link rel="stylesheet" href="../assets/materialize/css/materialize.min.css" media="screen,projection"/>
    <link href="../assets/css/bootstrap.css" rel="stylesheet"/>
    <link rel="stylesheet" href="../assets/css/layui.css" type="text/css"/>
    <!-- Custom Styles-->
    <link href="../assets/css/custom-styles.css" rel="stylesheet"/>
    <script src="../assets/js/jquery-1.10.2.js"></script>
    <script src="../assets/js/bootstrap.min.js"></script>
    <script src="../assets/js/manage_js/OtherSOF.js"></script>
    <script src="../assets/js/manage_js/EncryptAndDecrypt.js"></script>
</head>
<body>
    <div id="page-wrapper">
        <div class="header">
            <h3 class="page-header">加解密测试</h3>
            <ol class="breadcrumb">
                <li><a href="#">SOF接口测试</a></li>
                <li><a href="#">加解密测试</a></li>
            </ol>
        </div>
        <div id="page-inner">
            <div class="row">
                <div class="col-md-12">
                    <div class="card">
                        <div class="card-action" id="card-action">加解密</div>

                        <!--<div class="div-edit-head">
                            <p>添加账号</p>
                        </div>-->
                        <div id="div-add-content" style="margin-top: 40px;">
                            <div style="width:50%;float:left;margin-top:50px;">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">设置加密算法：</label>
                                    <select class="form-control" style="width:300px;" onchange="setEncryptMethod()">
                                        <option >请选择</option>
                                        <option value="SGD_SM3_SM2">SGD_SM4_ECB算法 </option>
                                        <option value="SGD_SHA1_RSA">SGD_SM4_CBC算法</option>
                                    </select>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">获取指定应用证书：</label>
                                    <div class="layui-input-block">
                                        <textarea style="height:90px;" id="getServerCertificateByUsage"   style="width: 300px;"  class="layui-input"></textarea>
                                        <button class="layui-btn" onclick="getServerEncryptCertificateByUsage()">加密证书</button>
                                       <!-- <button class="layui-btn" onclick="getServerSignCertificateByUsage()">签名证书</button>-->
                                    </div>
                                </div>

                            </div>
                            <div style="width:50%;float:left;">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">加密数据：</label>
                                    <div class="layui-input-block">
                                        <input type="text"id="encryptData"style="width: 300px;"  class="layui-input">
                                        <button class="layui-btn" onclick="encryptData()">加密数据</button>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">数据加密值：</label>
                                    <div class="layui-input-block">
                                        <textarea style="height:90px;" id="encryptvalue"   style="width: 300px;"  class="layui-input"></textarea>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">解密数据：</label>
                                    <div class="layui-input-block">
                                        <input type="text"  id="decryptData"style="width: 300px;"  class="layui-input" readonly="readonly">
                                        <button class="layui-btn"  onclick="decryptData()">解密数据</button>
                                    </div>
                                </div>
                            </div>
                            <div class="div-edit-button">
                              <span onclick="saveadd_oa()"><i class="fa fa-check-circle" aria-hidden="true"> </i></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <footer><p>Copyright &copy; 2021 All rights reserved.</p></footer>
    </div>

</body>
</html>